package com.ftg.learn.bus.basicinfo_record.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ftg.learn.bus.basicinfo_record.entity.BasicinfoRecord;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BasicInfoRecordMapper extends BaseMapper<BasicinfoRecord> {

    /**
     * 查全部
     * @return
     */
    @Select("select * from basicinfo_record")
    List<BasicinfoRecord> showAll();

    /**
     * 自动添加基础操作记录
     * @param uid
     * @param name
     * @return
     */
    @Insert("insert into basicinfo_record (basic_operate,basic_operater,basic_operatedate) values (#{param1},#{param2},NOW());")
    int autoInsert(String uid,String name);

}
